package com.wechat.service;

import com.wechat.dao.AnswerDetailDao;
import com.wechat.entity.AnswerDetail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * @author cgc
 * @date 18/4/9
 */
@Service
public class AnswerDetailService {

    @Autowired
    private AnswerDetailDao answerDetailDao;

    /**
     *
     */
    public int deleteById(Integer id) {
        return answerDetailDao.deleteById(id);
    }

    /**
     *
     */
    public int save(AnswerDetail record) {
        return answerDetailDao.save(record);
    }

    /**
     *
     */
    @Transactional(readOnly = true,rollbackFor = Exception.class)
    public AnswerDetail findById(Integer id) {
        return answerDetailDao.findById(id);
    }

    /**
     *
     */
    public int update(AnswerDetail record) {
        return answerDetailDao.update(record);
    }


}
